@echo off

call "%VS80COMNTOOLS%vsvars32.bat"
echo Current directory is:
cd

DEVENV /REBUILD "Debug" ".\lfc\lfc\lfc.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Debug" ".\DriverAdapter\DriverAdapter\DriverAdapter.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Debug" ".\MmiTestComRes\MmiTestComRes\MmiTestComRes.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Debug" ".\MmiTestBaseDlg\MmiTestBaseDlg\MmiTestBaseDlg.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Debug" ".\HiMmiTest\HiMmiTest\HiMmiTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Debug" ".\HiMmiTest\HiMmiTest_CN\HiMmiTest_CN.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" ".\lfc\lfc\lfc.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" ".\DriverAdapter\DriverAdapter\DriverAdapter.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" ".\MmiTestComRes\MmiTestComRes\MmiTestComRes.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" ".\MmiTestBaseDlg\MmiTestBaseDlg\MmiTestBaseDlg.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" ".\HiMmiTest\HiMmiTest\HiMmiTest.vcproj"
if errorlevel 1 goto out

DEVENV /REBUILD "Release" ".\HiMmiTest\HiMmiTest_CN\HiMmiTest_CN.vcproj"
if errorlevel 1 goto out


:out
if not errorlevel 1 goto skiperror
echo ****************************************************************************
echo IMPORTANT: If your .NET environment crashed during the build, you should
echo            disable all your addins and try again.  To disable the addins: 
echo              1. Start VC.NET
echo              2. Go to Tools/Add-in Manager
echo              3. Uncheck all the checkboxes in the Startup column
echo ****************************************************************************
pause

:skiperror
echo ****************************************************************************
echo IMPORTANT: Build OK
echo ****************************************************************************
